import $http from '@/common/api/request.js'
const preUrl = '/order'
const fpreUrl='/forder'
export default{
	createOrder(){
		return $http.request({
			url: preUrl +'/create',
			method:'POST'
			});
	},
	getOrderByType(type){
		return $http.request({
			url: fpreUrl +'/orderType',
			method:'GET',
			data: {'type':type}
			});
	},
	getOrderInfo(id){
		return $http.request({
			url: fpreUrl +`/orderInfo/${id}`,
			method:'GET',
			});
	},
	giveUpOrderByUser(id){
		return $http.request({
			url: fpreUrl +`/giveupOrder/${id}`,
			method:'GET',
			});
	}
}